#!/bin/bash
SERVER_NAME="northmeter-platformMain"
PID=$(ps -ef | grep ${SERVER_NAME}.jar | grep -v grep | awk '{print $2}')

if [ ! $PID ]; then
    echo "process ${SERVER_NAME} not exit"
    exit
else
    echo "process id: $PID"
fi

kill -9 ${PID}

if [ $? -eq 0 ]; then
    echo "kill ${SERVER_NAME} success"
else
    echo "kill ${SERVER_NAME} fail"
fi
